import 'package:ceramics/extensions/ab_widget_extensions.dart';
import 'package:ceramics/styles/ab_styles.dart';
import 'package:ceramics/util/ab_const_url.dart';
import 'package:ceramics/widgets/ab_webview_page.dart';
import 'package:flutter/material.dart';
import 'package:get/get.dart';

class ABAboutPage extends StatelessWidget {
  const ABAboutPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      extendBodyBehindAppBar: true,
      appBar: AppBar(
        title: const Text('About'),
      ),
      body: Container(
        decoration: const BoxDecoration(
          image: DecorationImage(
            image: AssetImage("images/ceramics_39.webp"),
            fit: BoxFit.cover,
          ),
        ),
        width: double.infinity,
        child: SafeArea(
          child: Column(
            children: [
              20.toVerticalBox,
              // privacy policy
              Container(
                color: Colors.white,
                child: ListTile(
                  title: const Text('Privacy Policy', style: ABStyles.tsDarkBlack17Bold),
                  trailing: const Icon(Icons.arrow_forward_ios),
                  onTap: () {
                    Get.to(()=>ABWebViewPage(url: ABURLs.privacyPolicyURL, title: 'Privacy Policy'.tr));
                  },
                ),
              ),
              const Divider(height: 1,color: Colors.grey),
              Container(
                color: Colors.white,
                child: ListTile(
                  title: const Text('Terms of Service', style: ABStyles.tsDarkBlack17Bold),
                  trailing: const Icon(Icons.arrow_forward_ios),
                  onTap: () {
                    Get.to(()=>ABWebViewPage(url: ABURLs.termsOfServiceURL, title: 'Terms of Service'.tr));
                  },
                ),
              ),
            ]
          ),
        ),
      ),
    );
  }
}
